0b25f067d56c25d4bddb7f9fe64b8a77a771807b,SimpleNewsProject/SimpleNews/src/main/java/circularmenu/animation/DefaultAnimationHandler.java,DefaultAnimationHandler,animateMenuClosing,#Point#,87
Before Change
for (int i = 0; i < menu.getSubActionItems().size(); i++) {
if (menu.getSubActionItems().get(i).view != null) {
AnimatorSet animationSet = new AnimatorSet();
animationSet.playTogether(
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "translationX", -(menu.getSubActionItems().get(i).x - center.x + menu.getSubActionItems().get(i).width / 2)),
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "translationY", -(menu.getSubActionItems().get(i).y - center.y + menu.getSubActionItems().get(i).height / 2)),
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "rotation", -720),
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "scaleX", 0),
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "scaleY", 0),
ObjectAnimator.ofFloat(menu.getSubActionItems().get(i).view, "alpha", 0)
);
animationSet.setDuration(DURATION);
animationSet.setInterpolator(new AccelerateDecelerateInterpolator());
animationSet.addListener(new SubActionItemAnimationListener(menu.getSubActionItems().get(i), ActionType.CLOSING));
animationSet.setStartDelay((menu.getSubActionItems().size() - i) * LAG_BETWEEN_ITEMS);
animationSet.start();
if (i == 0) {
lastAnimation = animationSet;
After Change
PropertyValuesHolder pvhA = PropertyValuesHolder.ofFloat(View.ALPHA, 0);
final ObjectAnimator animation = ObjectAnimator.ofPropertyValuesHolder(menu.getSubActionItems().get(i).view, pvhX, pvhY, pvhR, pvhsX, pvhsY, pvhA);
animation.setDuration(DURATION);
animation.setInterpolator(new AccelerateDecelerateInterpolator());
animation.addListener(new SubActionItemAnimationListener(menu.getSubActionItems().get(i), ActionType.CLOSING));
if(i == 0) {
lastAnimation = animation;
}
animation.setStartDelay((menu.getSubActionItems().size() - i) * LAG_BETWEEN_ITEMS);
animation.start();
}
if(lastAnimation != null) {
lastAnimation.addListener(new LastAnimationListener());